import "swiper/swiper-bundle.min.css";
import "./slider.css";

import { getData, getDelayedData } from "../../../../api/getData";

import config, { imgURL } from "./config";

import render from "./slider.art";

import Swiper from "swiper/swiper-bundle.min.js";

//获取网络数据

getData(imgURL)
  .then((data) => {
    let html = render({
      ...config,
      ...{
        img: data,
      },
    });
    document.querySelector("#index-slider").innerHTML = html;

    const headSwiper = new Swiper(".swiper-container", config);
  })
  .catch((err) => console.log(err));
